﻿<UserControl x:Class="FrontEnd.ClosableTabHeader"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" >

	<UserControl.Resources>
		<BooleanToVisibilityConverter x:Key="BoolVisibilityConverter" />
	</UserControl.Resources>

	<StackPanel Orientation="Horizontal">
		<TextBlock Name="lblTitle" Text="{Binding Title}" VerticalAlignment="Center" />
		<TextBlock Name="lblChangeIndicator" Text="*" Visibility="{Binding ParentTab.IsModified, Converter={StaticResource  BoolVisibilityConverter}}" Margin="1,0,0,0" Foreground="Red" />
		<Button Name="btnClose" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="5,0,-3,0" VerticalContentAlignment="Center" ToolTip="Close" MouseEnter="btnClose_MouseEnter" MouseLeave="btnClose_MouseLeave" Click="btnClose_Click">
			<Button.Content>
				<TextBlock Text="x" FontSize="10"  Margin="0,-4,0,0" />
			</Button.Content>
		</Button>
	</StackPanel>
</UserControl>
